@brief read MPEG-TS tables that comes from a DTV card
@ingroup frontend_scan
@param parms pointer to struct dvb_v5_fe_parms created when the
frontend is opened
@param dmx_fd an opened demux file descriptor
@param tid Table ID
@param pid Program ID
@param table pointer to a pointer for the table struct to be filled
@param timeout Limit, in seconds, to read a MPEG-TS table
This function is used to read the DVB tables by specifying a table ID and
a program ID. The libdvbv5 should have a parser for the descriptors of the
table type that should be parsed.
The table will be automatically allocated on success.
The function will read on the specified demux and return when reading is
done or an error has occurred. If table is not NULL after the call, it has
to be freed with the apropriate free table function (even if an error has
occurred).
If the application wants to abort the read operation, it can change the
value of parms->p.abort to 1.
Returns 0 on success or a negative error code.
Example usage:
@code
struct dvb_table_pat *pat;
int r = dvb_read_section( parms, dmx_fd, DVB_TABLE_PAT, DVB_TABLE_PAT_PID,
(void **) &pat, 5 );
if (r < 0)
dvb_logerr("error reading PAT table");
else {
// do something with pat
}
if (pat)
dvb_table_pat_free( pat );
@endcode
@brief read MPEG-TS tables that comes from a DTV card @ingroup frontend_scan
@param parms pointer to struct dvb_v5_fe_parms created when the frontend is opened @param dmx_fd an opened demux file descriptor @param tid Table ID @param pid Program ID @param table pointer to a pointer for the table struct to be filled @param timeout Limit, in seconds, to read a MPEG-TS table
This function is used to read the DVB tables by specifying a table ID and a program ID. The libdvbv5 should have a parser for the descriptors of the table type that should be parsed. The table will be automatically allocated on success. The function will read on the specified demux and return when reading is done or an error has occurred. If table is not NULL after the call, it has to be freed with the apropriate free table function (even if an error has occurred).
If the application wants to abort the read operation, it can change the value of parms->p.abort to 1.
Returns 0 on success or a negative error code.
Example usage: @code struct dvb_table_pat *pat; int r = dvb_read_section( parms, dmx_fd, DVB_TABLE_PAT, DVB_TABLE_PAT_PID, (void **) &pat, 5 ); if (r < 0) dvb_logerr("error reading PAT table"); else { // do something with pat } if (pat) dvb_table_pat_free( pat ); @endcode